$OpenBSD: patch-src_PartFileConvertDlg_cpp,v 1.1 2011/12/11 18:31:13 dcoppa Exp $

Fix: disable the partfile importer's 'Add' button on the remote gui
unless using a localhost connection
(upstream git commit 004f3929d91e4b81f47235060d86686fff13e2d3)

--- src/PartFileConvertDlg.cpp.orig	Fri Dec  9 16:38:14 2011
+++ src/PartFileConvertDlg.cpp	Fri Dec  9 16:40:17 2011
@@ -94,6 +94,14 @@ CPartFileConvertDlg::CPartFileConvertDlg(wxWindow* par
 	m_joblist->InsertColumn(3, _("Filehash"),	wxLIST_FORMAT_LEFT, 100);
 
 	SetIcon(wxICON(convert));
+
+#ifdef CLIENT_GUI
+	// There's no remote directory browser (yet), thus disable the
+	// directory selector unless we're using a localhost connection
+	if (!theApp->m_connect->IsConnectedToLocalHost()) {
+		CastChild(IDC_ADDITEM, wxButton)->Enable(false);
+	}
+#endif
 }
 
 // Static methods
